package com.service.impl;

import com.dao.impl.DraftDaoImpl;
import com.dao.intf.DraftDao;
import com.entity.Draft;
import com.service.intf.DraftService;

import java.util.List;

public class DraftServiceImpl implements DraftService {

    DraftDao draftDao=new DraftDaoImpl();

    @Override
    public void saveDraft(Integer userId, String draft) {
        draftDao.saveDraft(userId,draft);
    }

    @Override
    public void releaseDraft(Integer draftId) {
        draftDao.releaseDraft(draftId);
    }

    @Override
    public Draft querySingleDraftByDraftId(Integer draftId) {
        return draftDao.querySingleDraftByDraftId(draftId);
    }

    @Override
    public List<Draft> queryDraftByUserId(Integer userId) {
        return draftDao.queryDraftByUserId(userId);
    }
}
